home *** CD-ROM | disk | FTP | other *** search
- PYRO - A Simulated Pyrotechnics Display
- ---------------------------------------
-
- Version 2.03 (August 1988)
-
- (c) 1988 K.G. Shields
- (c) 1987 K.G. Shields
-
-
- PYRO Version 1.00 was a program designed to produce a realistic simulation of a
- Pyrotechnics (fireworks) display utilising the power of an IBM AT compatible
- and the colour graphics capability of an EGA display. It was written as an
- entry in the 1987 "Your Computer" Microsoft Computer Program Art Competition,
- of which it was subsequently declared the winner. ("Your Computer" is a
- computing magazine published in Australia. The competition results were
- announced on page 34 of the January 1988 edition.)
-
- The prize in the competition was an "Earth Computer System" with a 10 MHz,
- 0-wait state 80286 CPU with 2 Mbyte of memory, a 1.44 Mbyte floppy drive and a
- 40 Mbyte voice coil hard drive plus an NEC Multisync Monitor; an Epson LQ2500
- Colour Printer; and $2000 worth of Microsoft Software. (At least that is what
- was advertised when the competition was announced.)
-
- The current version of PYRO represents a major revision of the original
- program. A number of features have been added, most of which were not possible
- in PYRO Version 1.00 because of the length limit of 199 lines imposed by the
- competition.
-
- Additions include:
-
- . An opening screen.
-
- . A new effect - Catherine wheels.
-
- . CGA, Hercules and text-only displays are supported. The program now
- identifies the type of display adapter in use. VGA displays should be
- detected correctly and driven in EGA mode, but this has not yet been tested.
-
- . The program detects processor speed and adjusts delay loops to compensate.
- It also synchronizes itself with the timer tick of the machine. Both these
- actions are necessary to generate a smooth display and reasonable sound
- effects. The maximum number of points used may also be reduced
- automatically, from a maximum of 60 down as far as about 24 if necessary. If
- the processor speed is too slow on an EGA-equipped machine, the program will
- automatically switch to CGA mode.
-
- . The program has been optimized considerably including trade-offs of size for
- speed, and can now run on a much wider range of machines. On very slow
- machines it switches to a simplified script which limits the amount of
- simultaneous screen activity that can occur. While permitting a usable
- presentation on slow machines, this very basic script gives only a taste of
- what is possible when PYRO is run on a good fast processor.
-
- . The source code is now compatible with Microsoft QuickC and Microsoft C
- Optimizing Compiler as well as Turbo C which was originally used. I now use
- QuickC as my development environment for C programming, and use the
- Optimizing Compiler when development is complete. For PYRO, QuickC generates
- object code that is somewhat slower than that from Turbo C, however the
- Microsoft C Optimizing Compiler generates code that is a few percent faster
- than that from Turbo C. (These results should not be taken as a general
- indication of the relative performance of these compilers, as PYRO is not a
- 'typical' program. See 'important note' below.)
-
-
- Requirements
- ------------
- . A fast IBM compatible such as a turbo XT or an AT
- . An EGA or CGA compatible display card, or Hercules monochrome. VGA should
- work in EGA mode (untested).
- . A colour display (preferably) if using EGA, CGA or VGA.
-
- The configuration of choice is still an 8MHz or faster AT with an EGA card and
- a colour display.
-
- When running at the correct speed one complete Pyrotechnics show, excluding the
- opening screen and end titles, will take about three to four minutes, or 180 to
- 240 seconds, to execute. If it takes longer than this, your machine is not
- fast enough to run PYRO at the correct speed. (The actual elapsed time and
- 'ideal' time in seconds are shown on the screen after PYRO terminates.) If the
- EGA mode runs too slowly then try the CGA option, and similarly try the TEXT
- mode if CGA is too slow.
-
-
- Method of Use
- -------------
- Like a real fireworks display, PYRO is really meant to be viewed in the dark.
- For the most realistic effect, first darken the room as much as possible and
- cover or turn off any LEDs or pilot lights on the computer and keyboard. If
- darkening the room is too difficult PYRO will still give a convincing display
- by normal room lighting, but I recommend viewing it in the dark at least once
- to experience the full impact.
-
- Put the PYRO disk in your A drive and make A: the default drive. To execute
- PYRO to produce one complete Pyrotechnics presentation, enter
-
- pyro
-
- at the DOS prompt. Alternatively parameters may be specified which turn off
- sound effects, select the type of presentation (EGA, CGA or TEXT), or select
- continuous running. For example the following command will produce a
- continuous show without sound effects, in CGA mode
-
- pyro c q cga
-
- To terminate the show immediately at any time hit the escape key. For a more
- graceful exit press any other key and the program will stop after completing
- all currently active sequences.
-
-
- Parameters
- ----------
- C Causes PYRO to run continuously until stopped by pressing a key. Use
- for a continuously running demo, or as a screen saver (but be warned:
- visitors to your office may find it distracting).
-
- Q Runs in quiet mode, without explosion sound effects
-
- EGA Forces the program to run in EGA mode
-
- CGA Forces the program to run in CGA mode
-
- HERC Forces the program to run in Hercules mode
-
- TEXT Forces the program to run in TEXT mode. This is experimental and is
- only intended to be used on machines with no graphics capability or
- which are too slow to run in graphics mode. Produces severe 'snow'
- on some video adapters.
-
- R Causes PYRO to report its assessment of display adapter type and
- machine speed rating before starting the presentation.
-
- F Causes PYRO to execute at full speed, instead of attempting to
- synchronise with the timer tick of the machine. This option is used
- only for checking the results of attempts to optimize the program.
-
-
- Test Results
- ------------
- PYRO has been tested on a number of machines of different speeds and with
- various different types of displays. The results are summarised below. These
- measurements were performed using the Turbo C version and the results when
- other compilers are used will vary slightly.
-
-
- Machine Speed rating Display mode Time (secs) Comments
-
- NEC Powermate 1 337 EGA 204
- Cleveland AT 330 EGA 208
- Sperry 116 TEXT 179
- Olivetti M24 172 CGA 227
- Sharp PC7000 100 CGA 331 Slightly slow
- Cleveland XT 81 CGA 473 Slow
- Toshiba T1200 213 CGA 207
- NEC Powermate 386 474 EGA 183
- CCS XT (turbo) 173 CGA 254
- Earth 286 (10 MHz) 427 EGA 197
-
-
- IMPORTANT NOTE
- --------------
- Some people have tried to use PYRO as a benchmark test. This is unsound as the
- program attempts to compensate for differences in speed between different
- machines. I do not recommend the use of PYRO as a test for compiler speed,
- speed of generated object code, or machine speed. The mix of instructions used
- in PYRO is probably very different from that of most other applications.
-
-
- Technical Details
- -----------------
- The program is written in the C programming language. To achieve the required
- speed, the display registers and memory are accessed directly. At the time
- PYRO was originally written, it was fairly difficult to find information about
- doing this. However Microsoft Press have now published a book called
- "Programmer's Guide to PC & PS/2 Video Systems" by Richard Wilton, which I
- recommend to anyone wanting to use these techniques.
-
- In general, PYRO works by generating points and allowing them to continue in
- motion under the effect of simulated gravity. The attributes of a point
- include position, velocity, size, colour, lifetime, and rate of fade at the end
- of its life. Most attributes are generated randomly for each point, but the
- various effects are achieved mainly by manipulating the limits within which
- each attribute may lie.
-
- There are six different effects currently programmed:
-
- Spurt Produces intermittent eruptions of coloured sparks which fill
- the sky then fall gently to earth
-
- Flare A continuous stream of sparks emitted at high speed which fade
- quickly before they begin to fall
-
- Burst A starburst of brightly coloured points complete with sound
- effects
-
- Rocket A skyrocket which leaves behind a diffuse trail. Most end in
- a starburst but for realism a percentage of 'fizzlers' simply
- fade away to nothing.
-
- Roman Candle A large fiery ball shoots skyward, leaving a short, quickly
- fading trail. The ball explodes in a large burst that
- sometimes seems to fill the entire sky.
-
- Catherine Wheel A rotating catherine wheel emits streams of sparks in a spiral
- pattern.
-
-
- Files on the PYRO Disk
- ----------------------
- PYRO.C The complete source code of the program written in Turbo C.
- PYRO.EXE The program in executable form.
- PYRO.DOC This file, the documentation of PYRO.
- PYRO1.C The complete source code of PYRO 1.00, the original version.
- PYRO1.EXE PYRO 1.00 in executable form. Requires an AT with EGA
- graphics.
- PYRO1.DOC The documentation of PYRO 1.00.
- PYROLAB.PCX 'Paintbrush' file to produce a colorful floppy disc label, if
- you have the means to print it.
- PYRO.MAK 'Make' file for use with QuickC.
- OPTPYRO.BAT Batch file to compile PYRO with Optimizing C, using the
- options that result in the fastest object code.
-
-
- Future Plans
- ------------
- The initial version of PYRO was produced as an entry in the 'Your Computer'
- Microsoft Computer Program Art Exhibition. The current version implements most
- of the 'wish list' items of the original.
-
- Version 3.00 will be another major revision, the main new feature being that it
- will be programmable. The language being planned is PyroScript, a PDL
- (Pyrotechnics Description Language). This next version is probably a long way
- off, both because my ideas are fairly ambitious, and because I am now operating
- a full time computer consulting business which makes considerable demands on my
- time.
-
-
- Availability
- ------------
- PYRO 2.03 (along with all earlier versions) is in the public domain and may be
- copied and distributed freely.
-
- Unless the written permission of the author is obtained beforehand, program
- PYRO may not be sold for any sum in excess of the normally accepted charges for
- copying and distributing public domain software, nor may it be used in any
- other manner for direct commercial gain. However it may be used as a
- demonstration at trade shows, on dealers premises, etc, either alone or in
- combination with other programs. The 'continuous' option is useful for this
- purpose.
-
- Unless the written permission of the author is obtained beforehand, the whole
- or any part of PYRO may not be incorporated into any other item of computer
- software.
-
-
-
- Please direct any comments, enquiries or suggestions to
-
- Mr Kelvin G. Shields,
- Dimension 88,
- P.O. Box 202,
- Mount Ommaney,
- Queensland 4074,
- AUSTRALIA.
-
- Phone: (07) 376 8383
-
-
-
-
-
- K.G. Shields.
-
- 08/08/88
-
-
-
-
- Footnote
- --------
- I am grateful for the encouraging comments I have received about PYRO, both
- from within Australia and from overseas, and I am keen to receive any further
- communications.
-
- Thank you also to those who expressed concern about the trouble I have
- experienced in collecting my prizes from the competition, and asked to be kept
- informed of developments. For you, and as a caution to others who may be
- interested in entering competitions, I include the summary below. The full
- diary of events stretches for five pages, and a satisfactory conclusion has not
- yet been reached. However both Microsoft and Epson were very cooperative when
- I eventually contacted them directly, and I do not believe any blame for my
- problems rests with them.
-
- I am told it is not unusual for organisers and/or sponsers to lose interest in
- delivering prizes once a competition is completed, and this certainly seems to
- have happened here. My colleagues tell me I have expended more effort in
- attempts to collect the prizes than I put into producing the original entry.
-
-
- Diary Summary
- -------------
-
- 16/11/87 Received telegram from the magazine notifying me of my win. Letters
- and phone calls back and forth followed, and I was informed the prize
- would be shipped without delay. (Competition conditions specified
- prizes would be delivered within 1 month of winners being notified.)
-
- 08/01/88 After many phone calls which were not returned, I was told the prize
- was already on its way and would arrive within a few days.
-
- 01/02/88 After several more phone calls, demanded a report of current status.
- Was eventually told that the prize was shipped last week. Suggested
- I call back in a week's time if it had not arrived.
-
- 11/02/88 After several more phone calls about non-arrival of prize, was told
- to contact Epson (Sydney) as all parts of prize had been sent to them
- for shipping. Called Epson. They were ready to send me the printer
- but they knew nothing about the other components of the prize.
-
- 25/02/88 Printer arrived from Epson.
-
- 09/03/88 Was told by magazine that both software and computer had just arrived
- in Australia and were both held up in Customs. Suggested I call back
- next Monday if not received by then.
-
- 23/03/88 Spoke to local agents for the computer company and was given name and
- phone number of a contact in Melbourne. Called him and was told that
- the machine offered as the prize had not yet been manufactured
- because of delays overseas. He was willing to give me a substitute
- machine with equivalent specifications from their current product
- line. However he had not yet been informed by the magazine of the
- outcome of the competition or the name of the winner, so would have
- to contact them first.
-
- 11/04/88 Spoke to local agents for Microsoft. They promised to investigate
- with Microsoft (Sydney) on my behalf.
-
- 27/04/88 Microsoft called, recorded my list of selected software, and promised
- to organize shipment as soon as posible. Said they had not yet been
- requested by the magazine to ship the prizes. One of the other
- prizewinners had had similar problems to my own and had also just
- contacted Microsoft directly.
-
- 28/04/88 Software arrived.
-
- 02/05/88 Microsoft called to verify that shipment had arrived and was all in
- order.
-
- 27/05/88 After repeated calls to the computer company since first contact,
- computer was finally shipped on this date.
-
- 30/05/88 Computer arrived but is unsatisfactory in a number of ways:
-
- . The monitor is an EGA ECM-5400 made in Taiwan rather than the NEC
- Multisync. Furthermore the display adapter in the machine supports
- enhanced modes I would like to use, but which cannot be used
- without a multisync monitor.
-
- . An old-style keyboard was supplied rather than the 101 key type I
- was assured would be provided.
-
- . Memory is only 640K.
-
- . Hard disk is only 20Mbyte.
-
- . The monitor power cable has a foreign (round pin) plug.
-
- . No printer cable.
-
- . MS-Dos and GW-Basic supplied on the hard disk but no floppy disks
- supplied. A Dos manual was supplied but no GW-Basic manual and no
- User Manual for the machine.
-
- . A number of Norton programs supplied on the hard disk but no floppy
- disks or manuals. No indication whether I am legally entitled to
- these.
-
- . No SETUP program supplied and it was needed because the CMOS
- information was incorrect.
-
- . The machine fails to boot up when turned on, and has to be reset up
- to a dozen or more times before it successfully boots. During this
- process keyboard and memory diagnostics may be produced.
-
- . The second serial port does not work.
-
- 02/06/88 Sent a letter listing problems and asking for remedial action.
-
- 16/06/88 No response yet, so phoned to verify that letter had been received.
-
- 18/07/88 Sent second letter requesting action on previous letter.
-
-
- At this stage I have allowed a further two months for action, which I think is
- more than fair. In that time I have received absolutely no communication from
- the computer company. I now intend to enlist outside help to try to resolve
- the remaining problems.
-
-
-
- 27/09/88